
{***********************************************************}
{                                                           }
{      Common Library                                       }
{                                                           }
{      Copyright (c) 2001-2008 Luxena Software Company      }
{      http://www.luxena.com                                }
{      e-mail: support@luxena.com                           }
{                                                           }
{***********************************************************}

unit LXIDAC;

{$I lx.inc}

interface

procedure CheckLicense;

implementation

{$IFDEF __TRIAL__}

uses
  Windows, SysUtils, LXConsts;

const
  STrialCaption = 'Unregistered version';
  STrialMessage = 'Please note that Luxena products are shareware.' + SLineBreak +
    'After a 30 day trial period you must either' + SLineBreak +
    'register it or remove it from your computer.' + SLineBreak + SLineBreak +
    'Visit ' + SCompanyURL + ' for details.';
  STrialWarning = 
    'This application uses unregistered version of Luxena Informix Data Access Components.' +
    SLineBreak + 'Please register.' + SLineBreak + SLineBreak +
    'Visit ' + SCompanyURL + ' for details.';

const
  TwoHours = 1/12;
  TenSeconds = 1/(24*60*6);
var
  CheckTime: TDateTime;
  
procedure CheckLicense;
begin
  if Now > CheckTime then
  begin
    MessageBox(0, STrialWarning, STrialCaption, MB_OK + MB_ICONWARNING);
    CheckTime := Now + TenSeconds;
  end;
end;

initialization
  CheckTime := Now + TwoHours;

{$ELSE} // __TRIAL__

procedure CheckLicense;
begin
end;

{$ENDIF} // __TRIAL__

end.